﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Collections;
using Webchatting.Common;
using Webchatting.Dal;

public partial class server_EditPersonalBaseInfo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            OperationRU ORUser1 = new OperationRU();
            FormsIdentity id = (FormsIdentity)User.Identity;
            IList<string> ilist = new List<string>();



            ilist = ORUser1.GetRUPersonInfo(id.Ticket.UserData.Split('@')[0]);
            txtUserNickName.Text = ilist[0];
            txtUserRealName.Text = ilist[1];
            txtEmail.Text = ilist[3];
            txthometown.Text = ilist[4];
            txtcity.Text = ilist[5];
            txtAge.Text = ilist[6];
            txtcollege.Text = ilist[2];
            txtUserTel.Text = ilist[7];
        }

    }
    protected void btnEditSummit_Click(object sender, EventArgs e)
    {
        
        OperationRU ORUser = new OperationRU();
        FormsIdentity id = (FormsIdentity)User.Identity;
       
        ORUser.UpdatePersonInfo(id.Ticket.UserData.Split('@')[0], txtUserNickName.Text.Trim(), txtUserRealName.Text.Trim(), txtcollege.Text.Trim(),
            txtEmail.Text.Trim(), txthometown.Text.Trim(), txtcity.Text.Trim(), txtAge.Text.Trim(), txtUserTel.Text.Trim());
        Response.Write("<script>alert('修改成功!');window.parent.location.href='RUIndex.aspx';</script>");
        
    }
}
